package seeders

import (
	"github.com/goravel/framework/facades"
	"goravel/app/models"
)

type ConfigurationSeeder struct {
}

// Signature The name and signature of the seeder.
func (s *ConfigurationSeeder) Signature() string {
	return "ConfigurationSeeder"
}

// Run executes the seeder logic.
func (s *ConfigurationSeeder) Run() error {

	configurations := []models.Configuration{
		{
			ServerName: "GG_Host",
			ServerPort: "7002",
			Host:       "15.235.181.138",
			Type:       "sftp",
			Port:       "8822",
			Username:   "zy9014638002",
			Password:   "zy9014638002",
			UserID:     1,
			Active:     0,
		},
		{
			ServerName: "GG_Host",
			ServerPort: "7002",
			Host:       "51.79.163.221",
			Type:       "sftp",
			Port:       "8822",
			Username:   "xul",
			UserID:     1,
			Active:     0,
			Password:   "505316q.",
		},
		{
			ServerName: "Gportal",
			ServerPort: "52721",
			Host:       "83.223.197.143",
			Type:       "ftp",
			Port:       "52721",
			Username:   "gpftp650664212747169",
			Password:   "jJSwsu6A",
			UserID:     1,
			Active:     1,
		},
		{
			ServerName: "GG_Host",
			ServerPort: "7062",
			Host:       "148.251.131.102",
			Type:       "sftp",
			Port:       "8822",
			Username:   "liuhengda1117",
			Password:   "liuhengda1117@@",
			UserID:     1,
			Active:     0,
		},
	}

	//批量创建
	facades.Orm().Query().Create(&configurations)
	return nil
}
